package com.muchfish.reactor.api;

import reactor.core.publisher.Flux;
import reactor.test.StepVerifier;

public class ReactorTestingExample {
    public static void main(String[] args) {
        Flux<Integer> flux = Flux.range(1, 5);

        // 使用 StepVerifier 验证数据流的行为
        StepVerifier.create(flux)
                .expectNext(1, 1, 3, 4, 5)//正确顺序应该是12345
                .expectComplete()
                .verify();
    }
}
